Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0 preview #7372

Merged
merged 9 commits into from
Mar 16, 2021
Merged

3.0 preview #7372

merged 9 commits into from
Mar 16, 2021

Conversation

qinliujie
Copy link
Contributor

What is the purpose of the change

to support mesh style route rule

private static ConcurrentHashMap<String, MeshAppRuleListener> appRuleListeners = new ConcurrentHashMap<>();

public static void subscribeAppRule(String app) {
// 注册 diamond 的监听
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls comment in english

import java.util.Map;


public class BaseRule {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls override equal and hashcode method

package org.apache.dubbo.rpc.cluster.router.mesh.rule.destination;


public class TCPSettings {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this class used for? without getter and setter method

package org.apache.dubbo.rpc.cluster.router.mesh.rule.destination;


public class TcpKeepalive {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this class used for? without getter and setter method

public class DubboMethodArg {
private int index;
private String type;
private ListStringMatch str_value;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls use lower camel rule



public class DubboMethodMatch {
private StringMatch name_match;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls use lower camel rule

Yaml yaml = new Yaml();
DestinationRule destinationRule = yaml.loadAs(this.getClass().getClassLoader().getResourceAsStream("DestinationRuleTest.yaml"), DestinationRule.class);

System.out.println(destinationRule);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System.out.println has no effect in ut

Yaml yaml = new Yaml();
VirtualServiceRule virtualServiceRule = yaml.loadAs(this.getClass().getClassLoader().getResourceAsStream("VirtualServiceTest.yaml"), VirtualServiceRule.class);

System.out.println(virtualServiceRule);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be better to change to equal check

Copy link
Member

@AlbumenJ AlbumenJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check why integration test failed. Or maybe you can merge the latest 3.0-preview branch to your branch.

@codecov-io
Copy link

codecov-io commented Mar 15, 2021

Codecov Report

Merging #7372 (ad8b837) into 3.0-preview (2e7151e) will increase coverage by 0.40%.
The diff coverage is 84.09%.

Impacted file tree graph

@@                Coverage Diff                @@
##             3.0-preview    #7372      +/-   ##
=================================================
+ Coverage          57.13%   57.54%   +0.40%     
- Complexity           356      357       +1     
=================================================
  Files                983     1018      +35     
  Lines              40155    40746     +591     
  Branches            5999     6087      +88     
=================================================
+ Hits               22943    23446     +503     
- Misses             14501    14560      +59     
- Partials            2711     2740      +29     
Impacted Files Coverage Δ Complexity Δ
.../mesh/rule/destination/ConnectionPoolSettings.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...ster/router/mesh/rule/destination/TCPSettings.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...ter/router/mesh/rule/destination/TcpKeepalive.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...rule/destination/loadbalance/ConsistentHashLB.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
.../mesh/rule/virtualservice/match/ListBoolMatch.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...tualservice/destination/DubboRouteDestination.java 57.14% <57.14%> (ø) 0.00 <0.00> (?)
...mesh/route/MeshRuleAddressListenerInterceptor.java 63.63% <63.63%> (ø) 0.00 <0.00> (?)
...er/mesh/rule/virtualservice/DubboMatchRequest.java 66.66% <66.66%> (ø) 0.00 <0.00> (?)
...sh/rule/virtualservice/match/DubboMethodMatch.java 70.45% <70.45%> (ø) 0.00 <0.00> (?)
...uter/mesh/rule/virtualservice/match/BoolMatch.java 71.42% <71.42%> (ø) 0.00 <0.00> (?)
... and 72 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e7151e...ad8b837. Read the comment docs.

@chickenlj chickenlj merged commit 7c505f7 into apache:3.0-preview Mar 16, 2021
chickenlj pushed a commit that referenced this pull request Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants